import React from 'react'
import store from '../redux/store'

// store.subscribe(() => {
//   console.log(store.getState())
// })
export default function Count() {
  return (
    <div>
      <p>{store.getState().count}</p>
      <button
        onClick={() => {
          store.dispatch({ type: 'increment', num: 1 })
        }}
      >
        +
      </button>
      <button>-</button>
    </div>
  )
}
